package com.easy.order.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.easy.common.bean.OrderBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface OrderMapper extends BaseMapper<OrderBean> {

//    // 联表查询：根据订单ID查询用户信息
//    @Select("SELECT o.*, u.nickname AS userNickname " +
//            "FROM `order` o " +
//            "LEFT JOIN `user` u ON o.userid = u.id " +
//            "WHERE o.id = #{id}")
//    IPage<OrderBean> selectOrderWithUserNickname(IPage<OrderBean> page);




}
